package com.shgbit.tdd.marsrover;


/**
 * @author liuyong
 * @date 2020/4/12 14:59
 */
public enum CommandEnum implements CommandService {
    /**
     * 前进
     */
    F {
        @Override
        public void execCommmad(Position position, Mars mars) {
            position.forward(mars);
        }
    },
    /**
     * 后退
     */
    B {
        @Override
        public void execCommmad(Position position, Mars mars) {
            position.back(mars);
        }
    },
    /**
     * 左转
     */
    L {
        @Override
        public void execCommmad(Position position, Mars mars) {
            position.trunLeft();
        }
    },
    /**
     * 右转
     */
    R {
        @Override
        public void execCommmad(Position position, Mars mars) {
            position.trunRight();
        }
    },
}
